

from dataclasses import dataclass, field
from sqlalchemy import *

# from server import mapper_registry

# class Runner(db.Model):
#     '''
#     成绩单表
#     '''
#
#     __tablename__ = 'runner'
#
#     id = db.Column(db.Integer,primary_key=True)
#
#     name = db.Column(db.String(255))
#
#     command = db.Column(db.String(255))
#
#     command_config = db.Column(db.String(255))
from server import mapper_registry


@mapper_registry.mapped
@dataclass
class Runner:
    __tablename__ = 'runner'
    __sa_dataclass_metadata_key__ = "sa"

    id: int = field(default=None, metadata={"sa": Column(Integer, primary_key=True)}, )
    name: str = field(default=None, metadata={"sa": Column(String(255))}, )
    command: str = field(default=None, metadata={"sa": Column(String(255))}, )
    command_config: str = field(default=None, metadata={"sa": Column(String(255))}, )
